package temp

import (
	"background/model/back/entity"
)

// 支付方式

type Server struct {
	ID         uint   `gorm:"primarykey" json:"id,omitempty"`
	Name       string `gorm:"column:name;comment:'名称';type:varchar(255)"    json:"name,omitempty"`
	Network    string `gorm:"column:network;comment:'网络类型(tcp)';type:varchar(255)"    json:"network,omitempty"`
	Host       string `gorm:"column:host;comment:'host';type:varchar(255)"    json:"host,omitempty"`
	Port       uint16 `gorm:"column:port;comment:'port';type:integer"    json:"port,omitempty"`
	Rate       int16  `gorm:"column:rate;comment:'节点速率';type:smallint"    json:"rate,omitempty"`
	ServerPort uint16 `gorm:"column:server_port;comment:'port';type:integer"    json:"server_port,omitempty"`
	Show       int16  `gorm:"column:show;comment:'显示';type:smallint"    json:"show,omitempty"`
	Tls        int16  `gorm:"column:tls;comment:'启用tls';type:smallint"    json:"tls,omitempty"`
	Sort       int    `gorm:"column:sort;comment:'排序';type:int"    json:"sort,omitempty"`
	Type       string `gorm:"column:type;comment:'方式(vmess)';type:varchar(255)"    json:"type,omitempty"`
	IsOnline   int16  `gorm:"column:is_online;comment:'在线';type:smallint"    json:"is_online,omitempty"`
}

func (c Server) TableName() string {
	return entity.ProjectPre + "server"
}
